<!DOCTYPE html>
<html>
<head>
    <title>排行榜</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.phone" @on-enter="query" placeholder="手机号"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("spreadrank:info"))
                <i-button type="warning" @click="initHistory"><i class="fa fa-pencil-square-o"></i>&nbsp;生成上月历史榜单</i-button>
                #end
                #if($shiro.hasPermission("spreadrank:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("spreadrank:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("spreadrank:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("spreadrank:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="spreadrank" :rules="ruleValidate" :label-width="80">
            <Form-item label="用户编号" prop="userId">
                <i-input v-model="spreadrank.userId" placeholder="用户编号"/>
            </Form-item>
            <Form-item label="用户名" prop="userName">
                <i-input v-model="spreadrank.userName" placeholder="用户名"/>
            </Form-item>
            <Form-item label="头像" prop="userLogo">
                <i-input v-model="spreadrank.userLogo" placeholder="头像"/>
            </Form-item>
            <Form-item label="排名" prop="ranking">
                <i-input v-model="spreadrank.ranking" placeholder="排名"/>
            </Form-item>
            <Form-item label="团队编号" prop="teamId">
                <i-input v-model="spreadrank.teamId" placeholder="团队编号"/>
            </Form-item>
            <Form-item label="更新时间" prop="updateDate">
                <i-input v-model="spreadrank.updateDate" placeholder="更新时间"/>
            </Form-item>
            <Form-item label="团队名称" prop="teamName">
                <i-input v-model="spreadrank.teamName" placeholder="团队名称"/>
            </Form-item>
            <Form-item label="" prop="teamCount">
                <i-input v-model="spreadrank.teamCount" placeholder=""/>
            </Form-item>
            <Form-item label="手机号码" prop="phone">
                <i-input v-model="spreadrank.phone" placeholder="手机号码"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/statistics/spreadrank.js?_${date.systemTime}"></script>
</body>
</html>